package com.easyseata;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SagaTransactionApiImpl {
	
	
	
	@Autowired
	SagaTransactionService sagaService;
	
	
	
	@GetMapping("/saga/commit")
	public void commit() {
		
		sagaService.doTransactionCommit();
		
		
	}
	
	@GetMapping("/saga/rollback")
	public void rollback() {
		
		sagaService.doTransactionRollback();
		
		
	}
	

}
